﻿using System.ServiceModel;
using System.Data;

namespace Skynet.CommonLibrary.WCF
{
    /// <summary>
    /// 数据访问中心
    /// </summary>
    [ServiceContract]
    public interface IDataAccessCenter
    {

        /// <summary>
        /// 查找
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        byte[] FindEntity(ParamesEntity data, string expression);
        [OperationContract]
        byte[] FindData(ParamesEntity data);

        /// <summary>
        /// 更新
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        bool ModifyData(ParamesEntity data);

        [OperationContract]
        object GetObject(ParamesEntity data);

        [OperationContract]
        DataTable GetTable(ParamesEntity data);

        [OperationContract(IsOneWay=true)]
        void ExecuteCommand(ParamesEntity data);
    }
}
